Fixed issue with syncTo and directory