check_flags moved, prog_name added