adding error reporting (temp)