adding log statements, adding nullable annotation to cancelled and finalized parameter