Added baseName to extract base file name from file path.