removed console prints & catching socket exception