Added some debug outputs for testing