Moved back console and error redirection to ahead of all scripts.