error handling fix for checkSN()