refactor pistream to proper directory