Added a checkFileInOut() to check files for encryption/decryption + minor fixes