fix resource leak for adfs file access that causes db file lock