Refactored writeData to use a private method that does everything but write the actual data, which is handled by a block
Documented and unit tested that "now" gets used if no fileDate is passed to the writeData methods