Update preferences file