added test for create_instance_metadata_file and the method for the refactoring of metadata dump