Listener cleanup should be performed in beforeBuildFinish() hook