Added PrintWriter for trends