Update FileMap.java

use try with resources