fixed some runtime errors
Added description when application exits