Use pushd/popd when changing to log directory and redirect to /dev/null