Callback function added to run method.