push function now uses the new bash sync() function