fix uploadlog route and add a basic test to it