Forgot append mode for file when writing