Added check for non existing folder to prevent crash.