added "file lock" when updating profiles