changed production to local error reporting