Changed file mode from append to write.