Moved validate_email to try block