[fix bug 6582829] [fix bug 6561104] hooking after addResourceVersion and added better resource filters
removed console.logs and first try at test fixing