Further fixes for creating, editing and outputting files