Optical fiber Bragg grating based chemical sensor