added check for required perl module.
cosmetic changes.