Fixed extraction of file name