Add tests for files with append mode