fixed bug with reading unencrypted files