Bifunctional properties of hydrothermal synthesized BaMF4 (M = Co, Ni and Zn)