Added proper logging support.