Adding further stream check before reading or writing from / to streams.
Release 1.0.3.