#3256 improved error handling, fixed default pattern for CN extraction