fixed bug in replaceConsole option
updated version
added example