Fixes to communicator package as suggested by @illarionov

Changing context scope.

Moving closing commands into finally{}

Making all IOExceptions temporary.