replace sleep with logs