remove localhost constraint; support file replacement