Added a try catch block in socketbox.py