Check if a databse table exist before execute the SQL command

Fixed #18