Add more diagnostic output