improved logging to output, added start index token