Update file mapping and set reponse header when downloading script.