Improved logging in MetadataWriter