add support for options and not truncating offset for IO.write