Added signal.h and Sanity check to result in the callback method