changed variable name "$topic" to "$fn"