Should not access global variable when determining file path.