fix bug at relative path for output