[BUG] App setting are reset to initial after error

When some error appears last app settings changes aren't saved.
Looks like that settings save into file system only after successful application exit.