properly encode files in format 1 and 3