Rename file, optimization, begin output function.