added formatting;showRecord checks if fileis empty