* I think this is related to another PR but I'll repeat here: perhaps just re-use `strings.HasSuffix`
* Just a general stylistic issue: compare with the empty string, e.g. `file != ""` instead of comparing with the length of the string