Added error handling for minet_connect()