changed default error path
updated test cases