some tweaks to file upload