Fixed uncaught exceptions in Client and Server
Added additional filestream close statements to client in case of exceptions