Abstract out the "write-alias" function for system