implemented rudimentary error reporting