added certificates check

removed unused line