Updated for cron/production

Fixed some bugs with the fileparse parameters.