Add support for creating appropriate folders if they are nonexistent