Replaced console log calls with logger library