added more logging statement for debugging purposes