error checking in a-file module