improved tests and error logging