added serial exception handler