open files binary when reading attachments