clean_string() now handles all inputs from log files