fixed log implementation