abstract fs functions to it's own module