fixed trap for error_exit, removed clean_exit trap