Changed main.c to write to right file
Added sorted.yay