Oil gains ground before US energy report