Added --upload command line option