Fixed some error checking and added french error messages