moving file recognition from layer to annotation