updated hacky localPathToFile param