fixed desktopapp to handle a lot more exceptions