Modify methods so the path is passed using FileLocator object.