Improve 'trigger callback' in case of error