handle the situation when template dir doesn't exist