added better logging and moved searchnreplace up in the order of rules