fixed issue writing connections to temp dir and added wk_dir to path for simulation