addid logging functionallity + minor bugfixes