Made some bug fixes, tmp directory creation