Fix possible race condition issue

On Linux we approached `Cannot call method 'close' of undefined` error.
It was the case when observed folder was added to .lintignore