Add more error case logging