Fixed extension checking in saveLog