@phaedrux Hi, I just removed the M24 from the end of the filament-error file and now it seems to be working properly. I ran a quick test print, caused a filament error and I was able to click "OK" to remove the error message popup, retract/unload the filament from the hotend, load new filament and resume printing.
Thanks so much for your help, it is very much appreciated.