logging and callback fix