Improve error occurred

CC: @tuhdo, #25