Write to file works ok

Still need to sort the list properly