test appending to a file