Fix infinite loop + bug in file knob