Added method to fetch output from external source

Added callbacks to fetch data from external sources.