Better logging, fixed problem with missing import
Retry connection (not request!) if it fails