made error reporting optional