fixed addFileToPackage issue.