Changed number of digits in output file to 4