add error reporting

Just for the future.