Change order of execution for logging purposes