changed sleep time and added logic to create the FPDIR folder if it didnt already exist. curl fails if the output dir doesnt exist