put sleeping in try catch