Added test mode option.