fixed error console logging