This is wrong. You should not alter the state of the existing loader instance as it might have side effects (for instance when using the console shell to run the command as the same process will continue running, and so the same loader)

Thus, do you really need to use the loader ?