remove sleep, always use timeout; add recording