fixed 'path' bug for file upload, rewrite file update, rm unused files