change link to checkbox and fix bugs when delete with no file