Log exception instead of just printing it to screen.
Introduce requests timeout to prevent deadlock when no data is received.