this should not be needed. php calls close() anyway.