file i/o encrypt and decrypt working