Added basic error handling and new requirement for pycrypto