Replace or append EOL of files