Replace direct usage of dirs