Improving file upload code a bit.