Added better error spotting