added small change for when writing to console