Set object property using a file path and contents