add better error output