Fixed file watching upon encountering errors