file input, check for valid and solvable puzzle