Correctly write sources and list files