Added a socket timeout to stop the hanging process error