Add afterload callback function