Fixed bug that replaced file content