Try with im_func instead of __func__