rebuilt console output system to work beter with multi line support