Replaced file locking code
Merge pull request #281 from diadistis/master

Replaced file locking code