added file detection to board.cs