fix extraction of layer information from file metadata