adding PrintWriter to console