[front] Make sure a BufferedReader gets closed in method exec.