issue #533 - avoid file deadlock mess