add handler for errors