Thread safe console and auto remove of console listeners