rescue logger. regexp improovement