update the logic of updating HTML and deleting old files
trying to fix some bugs and update to 0.0.4