Fixed open multipage file and directory.