Imported from Linux Mint with modifications, diff against existing file if present