implemented file / directory .close()