Add more valid media types, move walkFunc into fsManager body so state variables can be used in the closure