Add support for flag string in tasks