Added file io with filename.