Added Try/catch for the read file input