Why do we use the same handler function - why don't we just define a separate function for logging?