po: use prep_writefile before creating any files in refreshpot and refreshpo