Auto-format file