added timeout and deleted handle error