finally writes yml correctly