Bug fix: empty file hasn't any extension