Nitpicky, but this code could just be moved to an if statement inside the next if statement where success is checked for?