Update file.go

Panic sometimes occurs at time 00h00 on windows, then the app crashes.
why should add this ,the returnErr default value is nil