Fix error output and Remove debug option