File-close bug possible workaround