Update comments.
Fixed a bug that number of newline characters are different by the environment.
Modified to ignore uppercase letters of lowercase letters at the file type validation.