compiles and downloads file