removed bug with files being reopened