put replacefile HTML to a more sensible place and issue success message