1.add error check on lib/Encryption.php