Tweak handling of script files in debug mode