Added a variable for db readonly for a header.

Ref #156
Add a warning message if DB is in readonly mode.

Closes #156