Improved uploaded file naming algorithm