Correct logic error and added clean to git checkout
Added before_build hook
Fixed bug with -f