Catch error when setting file date