add locks to config and storage