Replace edit temporary file with write temporary file