fixed typo bug preventing submit
added logging