revise all error custom functions