moved location of console write