Limit document file sizes to 16MB on open

This is for #7223

* Display a message if we've reached the limit opening a file

PR Replace #9495
thanks @peterflynn for fixing!