updated callback to have an error in the first argument