fixed error message
shrunk log output
some enckey typos and error checking
added some tests for issue #81