Removed unnecessary lines from Metadata writing.