Fix syntax error and front-load option lib check for debug