correct patch upload output and normal upload output
optimized patch upload