auto-detection of the format + default name is filename whitout extension + add errors handling