Fixed unicode errors.
Added actual argument parsing
Added a small sleep and retry for when connections fail at process startup