flush stdout so that messages are visible when awaiting download
added setup_package (thanks for figuring all this out @jdnc)