more fixes
had forgotten to require fs