How do I read from a property object and write the values into a file