added function to check if uploads folder exists