fix callback termination

when a plugin/app fails to install, 
config file would not be changed, 
then restartwatcher would not be called, 
the process would block.

this fix avoid that behavior.