added additional detail logging and error message logging