fixed warning msg, and changed error code pickup