** Fixed issue with ReadOnly and non-IDLE state **
* Added code to check for non-IDLE states and make sure
  document is READ ONLY on non-IDLE.