debugging upload script