Extract file system based functions into template loaders