Ability to define custom error functions is added