Made YAMLDatabase Thread safe