[App] Use trigger_error instead of echo