add lock for part.json file read/write
add lock for part.json access (complete last commit)
code reorganization for last commit
add some more info in log messages
Merge pull request #49 from wtangiit/master

add lock for part.json access