improve template interface and add missing methods in smarty and twig
fix doc
fix fileExists
add command test case