fixed replace, updated content to match updated field names, improved replace to accomodate for no new file content