Changed 'file.open' to 'file.write'.