Move file upload randomization to utility module.