Keep going only if err == nil;Code can be cleaner.