add file field to documents (re #216, re #225)