added options for moco server and used future to close context