Format a file