Move mktemp of downloadDir and FAILEDFILE
Change function names to generic camelCase