move code from one IOUtil to the other