fix default values not taken in build_command()
use a more specific message for mandatory parameter errors.