Modify cleanupWorkspace