Update file.go

New pull request for "Panic sometimes occurs at time 00h00 on windows, then the app crashes."