XD-916:Change file source to support contents or file reference