Exceptions for read/write errors

added exceptions for read/write errors to be able to distinguish failed read/write operations from boolean values (see issue #104 and issue #107 for context)