shouldn't the random stuff be done in getTempFolder?