Wait for the connection to ZooKeeper before accessing files

fixes #16