save errors instead of printing them