Added logging to metadata addition