Update file.go

New pull request for "Panic sometimes occurs at time 00h00 on windows, then the app crashes."
Merge pull request #778 from francoishill/patch-15

Update file.go