auto switch to local filename for localhost