fixed detection for first line of COS method: added YAML