Added extension to print task state as string.