Preferences file created/read

Reused + fixed code from UMP