Use journal.Writer instead os.File
Move all in main package