Solved a bug - added PrintWriter to handleAnswer