new I/O file helper functions