Added lock file to protect from memory overflow when diff is very large
Modified timeout