moved Image::Magick require to inside of the sub where it's used