add gem file, add compat for IO.write.