fix a bug with files extension, add comments