updates comments and returns errors instead of printing them