fixed division zero bug, added logger output