Handle differences between the local and remote files

Closes #17