added -tmp option to create all generated files in the tmp folder