capture.src function

Private function for catpuring the source code of model