Added check and creation of folder if not exist.