run_flagcosmics() and run_extract()