Write test file. Should be how the main works as well.