Handle err in callbacks