catch errors in callbacks