We find that variations in the UV emissions of cool M-dwarf stars have a potentially large impact upon atmospheric biosignatures in simulations of Earth-like exoplanets i.e. planets with Earths development, and biomass and a molecular nitrogen-oxygen dominated atmosphere. Starting with an assumed black-body stellar emission for an M7 class dwarf star, the stellar UV irradiation was increased stepwise and the resulting climate-photochemical response of the planetary atmosphere was calculated. Results suggest a Goldilocks effect with respect to the spectral detection of ozone. At weak UV levels, the ozone column was weak (due to weaker production from the Chapman mechanism) hence its spectral detection was challenging. At strong UV levels, ozone formation is stronger but its associated stratospheric heating leads to a weakening in temperature gradients between the stratosphere and troposphere, which results in weakened spectral bands. Also, increased UV levels can lead to enhanced abundances of hydrogen oxides which oppose the ozone formation effect. At intermediate UV (i.e. with x10 the stellar UV radiative flux of black body Planck curves corresponding to spectral class M7) the conditions are just right for spectral detection. Results suggest that the planetary O3 profile is sensitive to the UV output of the star from about(200-350) nm. We also investigated the effect of increasing the top-of-atmosphere incoming Lyman-alpha radiation but this had only a minimal effect on the biosignatures since it was efficiently absorbed in the uppermost planetary atmospheric layer, mainly by abundant methane. Earlier studies have suggested that the planetary methane is an important stratospheric heater which critically affects the vertical temperature gradient, hence the strength of spectral emission bands.