if not success, display error, return. To avoid extra indentation everywhere.