Index: trunk/ippScripts/scripts/magic_process.pl
===================================================================
--- trunk/ippScripts/scripts/magic_process.pl	(revision 22430)
+++ trunk/ippScripts/scripts/magic_process.pl	(revision 23186)
@@ -23,6 +23,4 @@
 
 use PS::IPP::Config 1.01 qw( :standard );
-
-my $ipprc = PS::IPP::Config->new(); # IPP configuration
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
@@ -62,9 +60,6 @@
     defined $outroot;
 
-# Unhandled exceptions should be passed on to my_die so they get pushed into the database
-$SIG{__DIE__} = sub { die @_ if $^S;
-                      my_die( $_[0], $magic_id, $node, $PS_EXIT_UNKNOWN_ERROR ); };
-
-$ipprc->define_camera($camera);
+my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $magic_id, $node, $PS_EXIT_CONFIG_ERROR ); # IPP configuration
+$ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_id, $node, $PS_EXIT_SYS_ERROR ) if $logfile;
 
 # RemoveStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
@@ -73,12 +68,9 @@
 # of the file names as arguments
 if ($outroot =~ 'neb:/') {
-    &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node,
-        $PS_EXIT_CONFIG_ERROR);
+    &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
 }
 
 # resolve any path:// or file:// in outroot
 $outroot = $ipprc->file_resolve($outroot);
-
-$ipprc->redirect_output($logfile) if $logfile;
 
 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
