Fixed race condition; Lock file by denying concurrent access in Windows