log module now outputs console log and error properly