Modified the action function for visiting source file.