add optional output to file