Added truncate mode to file.