guard against not having any documents opened