Updated to give better error handling when callbacks fail