added logging
Added saving state of question