added mock ability to write to files