Fixed "die" in OnApp.php - throws Exception instead