Added flashMode setting