remove dependency on fs