Small Updates in Network Package

Fixed some imports, added a try/catch block around a socket declaration