better way to use the credentials file