Truncating file content when mode says so