serial exception handling added