fixed bug #5894: File locking and unlocking not clean
Merge pull request #189 from Seidemann-Web/b-dev-ce

fixed bug #5894: File locking and unlocking not clean