Fix 'file_name' exception when listing environment in certain settings