Implement some sync options and fix local/remote file lookups