Printing to file when running as daemon