add object name to debug and error output (fix #24)