More error checking, allow user to set host, eliminate goroutine