quick fix to scheduler.js to fix case when empty S3 folder