set file.encoding
add shutdown hook + more logging
use random local port for embedded mongo