Fix template path not being shown on some compiliation failures. Close #293.