Catch connect errors on the fwrite and make a useful suggestion about a user/pass mismatch