Thanks for the tip. I tried replacing the "require" with the content of the library script and it works like a charm. However I regard this as a work-around for this particular case, but it doesn't resolve the issue. If there's anything I can do to help out finding and solving the real problem, just let me know. I'm rather new to CHDK, but it's a great project that I'd like to help as much as I can.