Correct saveToFs test and code cleanup