final error printing and stuff