Added wait before closing on error

.gitlab-ci.yml not found in this commit