add callback functions for errors