replaced panic with fatal for expected errors