Merge check-host and check-network, added getopts parsing