Chaged type to 'pointer' for fgets call to avoid TypeError