Biosynthesis of aldehydes and organic acids