implemented simple read-write lock
added lock files