Added logging for debug