Rework of file system for flask