catch exception if timeout is reach