Re-implemented metadata output. Fixed blank lines in case no metadata is provided
2prev