refine Cryptor - proper error checking and catching