Added some logging statements for debugging