use path.resolve instead of url.resolve for local file path