made getComopnentsDir() static method to re-use it in hooks
dynamically loaded components' messages