Added filesystem abstraction function