close and reopen docs