Fix error on unexisting enc_file, fix error where key2 were the same for all threads