Minor edits to package

Improved error handling using $sourceopen and $sinkopen symbols to track
the status of the input and output streams.