Add a null check and more inforamtion for timeout message