Adding function for checking if the database is in readonly mode