file upload not functioning properly