New downloadhandler and mime flags for sync() and download()