Ported file logging to SM1.6

Like I said I would.