application: only write preference a single time

Change-Id: Idf120f964cc91eeb1343ab10395cd3d23306fd85