Fix erase address computation and add diagnostic output