Replacing rename method with copy & unlink when uploading file