Add some log and test if fileEvent is from refresh action.
Fix error logging.