Write to log when a page doesn't exist
Write to log before showing messagebox error
Initial debugging-mode support with console window