Added debug mode to application.