Fixes bug where new files were created on each save.

instead of using the instance variable set at creation time.