Added some error messages for erroneous files