Add write_error _log function

write_error_log will write any error to a log, this simplifies find_rev
Changed test names to match function tested