Added format option and configuration setting for mode and format