the previous code seemed to try 5 times before giving up, except that it wasn't inside any loop, so it only tried once and there was no error msg. Now at least log that there was an error.