Adding additional logging messages for troubleshooting.