Added check the connection with "ping", before using it