Added test application and debug logging