cleanup and format JSON in the validate command.
remove extra line.
fix return values in validate.