Fixed so any errors will end program and wont print anything after