1) You could leave out the `} else {` and just return the error, and get rid of `return nil`
2) Maybe I'm missing something, but if `os.Stat` does not return an error, doesn't that mean that the file exists? This here looks backwards