using fs instead of path