needed to remove the "--" from the dirname command because the Synology doesn't recognize it.