log method fix and test