writeStep: Raise exception in case of IO error