Using defer to close files, updating readme