dynamically generated preferences file now works