Make a PM program save data and exit from cmd.line