fix double event triggering bug
add warning if pref file does not exist