Added debugging and reporting