wrapped filesystem in a function