added log messages and fixed widget not updating when state change in
app