Improved error handling for lilypond