Fix calls to file()

Closes #43