added better logging in grade.sh and build_and_test.sh