-- upload file fix, code cleaning