load the application state before save, if it is not loaded. The error message is handled correctly
use the correct variable
improve the application management