fixed read file exceptions and diplay of error