updated error reporting + minor edits