Timeout and error handling, pt1

Signed-off-by: Mario Kozjak <kozjakm1@gmail.com>