Made error output consistent, removed console.log

Also added test file