fixed error catching target name
updated readme and tests for target fix