Overwrite file with new content
Return content for invalid files