Fix issue where id not passed so form result rejected. Also added logging so if there is an error its is logged