WIP for integrating new file management into existing code