fixing bugs in Upload(Internel Server Error 500, File already exists and other)