Fix spelling and check file was written