check the error in sqlx.Open before attempting to dereference the return value so that when there are errors Opening sqlx does not panic