Added datatype to closeQuietly method