new replace file form
various improvements