added timeout for lock file acquisition