- small fixes and added logging