simple non-recursive searching: state machine working but file discovery isn't