Added wait and sleep.