no need for an else condition and plus the log statement is wrong.