Fixed dirname problem and updated new html template