issue error directly when doc is malformated
This should popup a message saying "No reader engine for this file"
instead of a crash when document file is malformated.

This should fix #868.
Merge pull request #870 from chrox/fix_868

issue error directly when doc is malformated