check if nmap call was successful before starting to parse the result of it