debugged crypto
added exceotion to IOError