If you want to print, use the reference to the output stream


out.println(fname);