Fixed error output in before/after build commands