Data reading and writing now returns a boolean indicating failure

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>