Added timeouts and fixed logger