Switched to using cached strings with cStringIO instead of file I/O