Reformat file and use debug rather than console