private boolean fatalErrorsFound(List<ErrorReport> errors) {
   for (final ErrorReport error : errors) {
     switch (error.getErrcode()) {
         // the following errors are considered fatal: export the db and
         // stop the task
       case ErrorReport.CHILD_COLLECTION:
       case ErrorReport.RESOURCE_ACCESS_FAILED:
         return true;
     }
   }
   // no fatal errors
   return false;
 }
 public void error(ErrorReport error) {
   log.write("----------------------------------------------\n");
   log.write(error.toString());
   log.write('\n');
   log.flush();
 }