Write subpackage source string to file