I suggest that instead of globally modifying the context loader which is a very bad thing IMO. You modify it only for the scope of execution of the script in a try/finally block. With a flag to disable the behaviour if needed. We currently load the console by newing it up, not via static void main