del test folder
add error function
fixed bugs, added error messages