log upload commands and exit on error