used tee instead of cat for writing to config