try handling prefix/suffix better
better error handling when syncing dir