Use url.toLocalFile instead of url.path.