added file, fixed logging (almost)