NPE bug fix
prepare for next release version
check param not null before closing resource