Added some timeouts and log messages for debugging purposes