Not enough information provided for a full answer, but...
What output do you get? What output did you expect?
What is this .
doc file? Is it a Microsoft
Word document? If so, remember that's not a text file, it's binary (maybe compressed XML?). You can't just print it as raw characters.