Add error handling, remove test record