update error report function