Move some code out of FileHelper that's purely chart related