Add cancelJob function