added ability to use a test flag, testing with live amazon is very very very tedious when using locally with slow uplink