altering download module to delete scripts before downloading