Error checking and stream lining