Persist device ID in file