it seems weird that this actually creates a file every time. i wouldn't expect that if i were calling this. it should probably at least memoize it.