Added lock on cac he file