Converted log calls to use the new function definitions