added cli flags for toggling flat schema and for manually specifying schema file.