Moving old sample code, adding errorlog example for v1