v 5.1.4: closing a file too soon