refactored FileHelper.
Fixing test breaks.