Formatting and more error reporting
Periodically try to reconnect if a connection fails

Fixes #3