Fix get module name from empty string

I fixed a bug on getting the module name from empty files
Thanks!