document updated & some bugfix

BUGFIX: closing file problem in catching exception
UPDATED:
- DocumentFileWriter
- document
- build.xml