Add resume function, generalize file iteration in enc_file