Refactor

check html directory exist or not