Acuire lock for all write processes