Write to files S and running times