Fixing file base name method