Added logging and fixed queue updating on task canceling