Check callback function in main thread