handle reloading errors without crashing the file observer thread