* improved error handling, logging and output