sorry I missed the exit(-1) below, you should just use fatal('xxxxxx') routine then.