added functionality to rename file if alread exist and actually move the file
updated upload functionality