SaveToFile can now save only to memory

This should fix #80