rebuild more smarty use log debug and other methods